import request from '../utils/request'

export const tagsApi = {
  // 获取标签列表
  getList: (params) => {
    return request({
      url: '/api/tags/list',
      method: 'get',
      params
    })
  },

  // 创建标签
  create: (data) => {
    return request({
      url: '/api/tags/create',
      method: 'post',
      data
    })
  },

  // 更新标签
  update: (data) => {
    return request({
      url: '/api/tags/update',
      method: 'put',
      data
    })
  },

  // 删除标签
  delete: (id) => {
    return request({
      url: `/api/tags/delete/${id}`,
      method: 'delete'
    })
  },

  // 获取标签详情
  getInfo: (id) => {
    return request({
      url: `/api/tags/info/${id}`,
      method: 'get'
    })
  }
} 